<% layout('/layouts/default.html', {title: '已发货订单列表', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${text('已发货订单列表')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
			
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${ztGoodsOrder}" action="${ctx}/shippedOrder/listData" method="post" class="form-inline hide"

					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">

				<div class="form-group">
					<label class="control-label">${text('交易订单号')}：</label>
					<div class="control-inline">
						<#form:input path="order" maxlength="200" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('姓名')}：</label>
					<div class="control-inline">
						<#form:input path="name" maxlength="30" class="form-control width-120"/>
					</div>
				</div>
				
				<div class="form-group">
					<label class="control-label">${text('号码')}：</label>
					<div class="control-inline">
						<#form:input path="phone" maxlength="20" class="form-control width-120"/>
					</div>
				</div>
				
				<div class="form-group">
					<label class="control-label">${text('地址')}：</label>
					<div class="control-inline">
						<#form:input path="addr"  class="form-control width-120"/>
					</div>
				</div>
				
				<div class="form-group">
					<label class="control-label">${text('商品名')}：</label>
					<div class="control-inline">
						<#form:input path="ztGoods.title"  class="form-control width-120"/>
					</div>
				</div>
				
				
				<div class="form-group">
					<label class="control-label">${text('微信名')}：</label>
					<div class="control-inline">
						<#form:input path="ztAdmin.name" maxlength="200" class="form-control width-120"/>
					</div>
				</div>
				
				<div class="form-group">

					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>

					<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>

				</div>

			</#form:form>

			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>






<% } %>
<script>



// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
{header:'${text('订单号')}', name:'order',index:'a.order',  width:220, align:"center"},
		{header:'${text('微信名')}', name:'ztAdmin.name',index:'u10.name',  width:100, align:"center"},
		
		{header:'${text('商品名称')}', name:'ztGoods.title', index:'z.title', width:170, align:"center"},
		{header:'${text('颜色')}', name:'colorName', width:80, align:"center"},
		{header:'${text('规格')}', name:'guigeName', width:70, align:"center"},
		
		{header:'${text('数量')}', name:'numCount', index:'a.num_count', width:70, align:"center"},
		{header:'${text('商品价')}', name:'goodsPrice', index:'a.goods_price', width:100, align:"center"},
		{header:'${text('余额抵扣')}', name:'balance',index:'a.balance', width:105, align:"center"},
		{header:'${text('运费')}', name:'freight',index:'a.freight', width:95, align:"center"},
		
		{header:'${text('应付总价')}', name:'totalPrice', index:'a.totalPrice', width:120, align:"center"},      
		
		{header:'${text('收货人')}', name:'name', index:'a.name', width:150, align:"center"},
		
		{header:'${text('号码')}', name:'phone', index:'a.phone', width:100, align:"center"},
		{header:'${text('商品编号')}', name:'sku', index:'a.sku', width:110, align:"center"},
		{header:'${text('渠道订单')}', name:'channelorder', index:'a.channelorder', width:110, align:"center"},
		{header:'${text('渠道价')}', name:'channelprice', index:'a.channelprice', width:100, align:"center"},

		{header:'${text('下单时间')}', name:'orderTime', index:'a.order_time', width:160, align:"center"},
		{header:'${text('付款时间')}', name:'payTime', index:'a.pay_time', width:160, align:"center"},
		{header:'${text('状态')}', name:'orderstatus', index:'a.orderstatus', width:100, align:"center", formatter: function(val, obj, row, act){
			return js.getDictLabel(${@DictUtils.getDictListJson('zt_orderstatus_type')}, val, '${text('待付款')}', true);
		}},
		
		{header:'${text('操作')}', name:'actions', width:100,align:"center", sortable:false, title:false, formatter: function(val, obj, row, act){
			var actions = [];
			<% if(hasPermi('shippedOrder:shippedOrderData:edit')){ %>
				
				actions.push('<a href="${ctx}/shippedOrder/form?id='+row.id+'" class="btnList" title="${text('查看订单详情')}"><i class="fa fa-navicon"></i></a>&nbsp;');

			<% } %>
			return actions.join('');
		}}
		
		
	],
	
	

	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>